﻿#pragma once

#include "componentbase.h"
#include "unstackplate.h"

class UnstackPlateManager : public ComponentBase
{
	Q_OBJECT

public:
	UnstackPlateManager(QObject* parent);
	~UnstackPlateManager();
	QStringList GetAllUnstackPlateName();
	UnstackPlate* GetPlateObject(const QString& id);
	virtual void* GetPoint(const QString& id) override;
	// 组件初始化处理函数
	virtual int ComponentInit() override;
	/*自检接口*/
	virtual bool ComponentCheckSelfState() override;
	/*复位接口*/
	virtual bool ComponentSelfReset() override;
	// 命令执行接口
	virtual bool ExcuteCmd(int cmd, const QByteArray& input, QByteArray& output);
private:
	int OnPlateArrive(const QByteArray& data);

private:
	std::map<QString, UnstackPlate*> m_plates;

};
